<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>构造函数继承</title>
</head>
<body>
<script>
    function Person(name,age){
        this.name=name;
        this.age=age;
    }
    function GoodS(name){
        Person.call(this,name);
    }
    var g1=new GoodS("JOB");
    alert(g1.name);
</script>
</body>
</html>